//请求拦截器
import { requestAuth, requestAuthErrorHandler } from './request/auth'

//响应拦截器
import { responseErrorHandler } from './response/error'
import { responseDataHandler } from './response/data'

export const setupInterceptors = (instance) => {
    instance.interceptors.request.use(
        requestAuth,
        requestAuthErrorHandler,
    )
    instance.interceptors.response.use(
        responseDataHandler,
        responseErrorHandler,

    )
}

